home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
1159.ZIP
/
OSSCOM.PRG
< prev
next >
Wrap
Text File
|
1986-11-20
|
5KB
|
204 lines
SELECT 5
USE DATAOPTN
GO VAL(NCHR)
OSSDATE=OSSDAT
USE
DAT=DATE()
SET SAFETY OFF
N4='K'
DO WHILE N4#'STOP'
SELECT 1
SET DELETED ON
N99='Z'
IF DAT<OSSDATE
SELECT 5
USE DATAOPTN
GO VAL(NCHR)
REPLACE OSSDAT WITH DAT
USE
SELECT 1
ENDIF
IF YEAR(DAT)*365.24+MONTH(DAT)*30.44+DAY(DAT)>YEAR(OSSDATE)*365.24;
+MONTH(OSSDATE)*30.44+DAY(OSSDATE)+29.44
DO WHILE N99#'Y'.AND.N99#'N'
CLEAR
@ 4,0 SAY 'It is time for this data base to reorganize its information so;
that it may'
?
?'operate with greater speed and efficiency. It will do this automatically;
at'
?
?'your command. The problem is that it may take a few minutes to do this,;
and'
?
?'you will NOT be able to use the data base during those few minutes.'
?
?
?'Do you wish to allow the data base to carry out the information ;
reorganization'
?
WAIT 'at this time ? (Y/N) ' TO N99
N99=UPPER(N99)
IF N99='Y'
?
?
?' WORKING . . .'
?
?
?' PLEASE DO NOT PRESS ANY KEYS DURING THIS PROCEDURE.'
USE &DBNAME INDEX &INDEX1,&INDEX2
PACK
SELECT 5
USE DATAOPTN
GO VAL(NCHR)
REPLACE OSSDAT WITH DAT
USE
OSSDATE=DAT
SELECT 1
ENDIF
ENDDO
ENDIF
CLEAR
@ 1,15 SAY 'Data base in use: '
?? OSS
DO WHILE ASC(N4)<65.OR.ASC(N4)>70
@ 3,0 CLEAR
@ 3,7 SAY 'What would you like to do ?'
?
?'A) Examine, print out, modify, or delete records through the use'
?' of ID codes.'
??' (By '
?? TVANUMBER
??' or by '
?? SERIALNUM
??')'
?
?'B) Examine, print out, modify, or delete records many records at a time.'
?
?
?'C) Add records to this data base.'
?
?
?'D) Make a backup copy of all records in this data base.'
?
?
?'E) Restore records to the hard disk from a backup copy.'
?
?
?'F) QUIT (with backup copy option)'
?
?
?' Press "RETURN" to return to previous menu.'
WAIT ' ' TO N4
??' WORKING . . .'
N4=UPPER(N4)
IF ASC(N4)=0
N4='Z'
RETURN
ENDIF
ENDDO
DO CASE
CASE N4='A'
DO OSSSEE
CASE N4='B'
DO OSSPREP
CASE N4='C'
DO OSSADD
CASE N4='D'
CLEAR
@ 5,0
?' This procedure copies all information for this data base FROM'
?' your fixed disk TO one or more floppy disks, depending on the'
?' size of this particular data base. In the process of doing this,'
?' the data (if any) which is currently on the FLOPPY DISKETTE(S)'
?' may be destroyed.'
?
?' Each data base which is backed up must be backed up on a separate'
?' floppy diskette (or a separate set of floppy diskettes).'
?
?
?
?' Please place a formatted floppy disk into drive "A" and'
?
?' press any key other than "RETURN" to continue. Press'
?
WAIT ' "RETURN" to abort this procedure and return to the menu.' TO N6
IF ASC(N6)=0
N4='Z'
LOOP
ENDIF
N4='Z'
DO DATABACK
LOOP
CASE N4='F'
?
?
DO WHILE N4#'Y'.AND.N4#'N'
CLEAR
@ 5,0
?' This procedure copies all information for this data base FROM'
?' your fixed disk TO one or more floppy disks, depending on the'
?' size of this particular data base. In the process of doing this,'
?' the data (if any) which is currently on the FLOPPY DISKETTE(S)'
?' may be destroyed.'
?
?' Each data base which is backed up must be backed up on a separate'
?' floppy diskette (or a separate set of floppy diskettes).'
?
?
WAIT ' Do you wish to make a backup copy of this data base ? (Y/N)';
TO N4
N4=UPPER(N4)
ENDDO
IF N4='Y'
?
?
?' Please place a FORMATTED diskette into drive "A."'
?
?
WAIT
DO DATABACK
ENDIF
CLEAR ALL
RUN CD\
SET COLOR TO
QUIT
CASE N4='E'
CLEAR
@ 5,0
?' This procedure restores files TO your fixed disk FROM one'
?' or more floppy diskettes. ANY data base in the ISR-20'
?' system may now be restored. This procedure also has been'
?' designed to reject most files which are foreign to the ISR-20'
?' system.'
?
?
?
?' Please place your backup copy into drive "A" and press any'
?
?' any key other than "RETURN" to continue. Press "RETURN"'
?
WAIT ' to abort this procedure and return to the menu.' TO N6
IF ASC(N6)=0
N4='Z'
LOOP
ENDIF
CLEAR
@ 5,36 SAY 'WORKING . . .'
CLOSE DATABASES
RUN RESTORE A: DATA*.*
RESTORE FROM DATANAME ADDITIVE
?'All options and definitions for all the data bases were also restored.'
?'If you have set options for any of the data bases since the time this'
?'data base was backed up, you should also, at this time, restore the records'
?'for any data base which was backed up at any time AFTER the last time you'
?'changed the options for any of the data bases.'
?
N4='K'
WAIT ' Press any key to continue . . .' TO N6
LOOP
ENDCASE
N4='Z'
ENDDO
RETURN